#ifndef T_SETUPS_H
#define T_SETUPS_H

#ifndef F_CPU
#define F_CPU 16000000UL
#endif

#include <avr/io.h>

#define TASK1_F 50
#define TASK2_F 50

#define TASK1_T F_CPU/(256*TASK1_F)
#define TASK2_T F_CPU/(256*TASK2_F)

/* Counters for periodic tasks */
extern volatile uint16_t TASK1_CNT;
extern volatile uint16_t TASK2_CNT;
/* Flag for periodic tasks */
extern volatile uint8_t TASK1_FLAG;
extern volatile uint8_t TASK2_FLAG;

extern void timer1_init(void);
extern void timer2_init(void);
extern void task_flags_init(void);
extern void manage_tasks(void);

#endif /* T_SETUPS_H */
